package com.vhans.db.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.vhans.core.domain.BCompetition;
import com.vhans.db.model.dto.ConditionDTO;
import com.vhans.core.web.model.dto.AgreementDTO;
import com.vhans.db.model.vo.agreement.AgreementHomeListVO;
import com.vhans.db.model.vo.agreement.competition.CompetitionAgreementVO;
import com.vhans.db.model.vo.agreement.competition.CompetitionInfoVO;
import com.vhans.db.model.vo.agreement.competition.CompetitionVO;

import java.util.List;

/**
 * 赛事业务接口
 *
 * @author vhans
 **/
public interface IBCompetitionService extends IService<BCompetition> {

    /**
     * 查看赛事列表
     *
     * @param condition 条件
     * @return 赛事列表
     */
    List<CompetitionVO> listCompetitionVO(ConditionDTO condition);

    /**
     * 添加赛事
     *
     * @param competition 赛事
     */
    void addCompetition(AgreementDTO competition);

    /**
     * 删除赛事
     *
     * @param competitionId 赛事id
     */
    void deleteCompetition(Integer competitionId);

    /**
     * 修改赛事
     *
     * @param competition 赛事
     */
    String updateCompetition(AgreementDTO competition);

    /**
     * 编辑赛事
     *
     * @param competitionId 赛事id
     * @return 赛事
     */
    CompetitionInfoVO editCompetition(Integer competitionId);

    /**
     * 查看首页赛事列表
     *
     * @return 首页赛事列表
     */
    List<AgreementHomeListVO> listCompetitionHomeVO();

    /**
     * 查看赛事
     *
     * @param competitionId 赛事id
     * @return 赛事
     */
    CompetitionAgreementVO getCompetitionHomeById(Integer competitionId);

    /**
     * 接下赛事
     * @param competitionId 赛事id
     */
    String takeCompetition(Integer competitionId);


    /**
     * 报名赛事参与者
     * @param competitionId 赛事id
     */
    String applyCompetition(Integer competitionId);
}
